﻿using RuoVea.ExSugar.Attributes;
namespace RuoVea.OmiApi.SystemApp.Entitys;

/// <summary>
/// 角色自定义数据范围表 - 角色定义授权时候使用
/// </summary>
[SugarTable(nameof(SysRoleOrg), "角色自定义数据范围表")]
[Description("角色自定义数据范围表")]
[Tenant("0")]
public class SysRoleOrg
{
    /// <summary>
    /// 角色Id
    /// </summary>
    [ConfigSugarColumn(columnKey: nameof(RoleId), columnDescription:"角色Id")]
    public long RoleId { get; set; }

    /// <summary>
    /// 机构Id
    /// </summary>
    [ConfigSugarColumn(columnKey: nameof(OrgId), columnDescription:"机构Id")]
    public long OrgId { get; set; }

    /// <summary>
    /// 机构
    /// </summary>
    [Newtonsoft.Json.JsonIgnore]
    [System.Text.Json.Serialization.JsonIgnore]
    [Navigate(NavigateType.OneToOne, nameof(OrgId))]
    public SysOrganization SysOrganization { get; set; }
}

